package com.tripwego.client.ui.widget;

import com.google.gwt.cell.client.NumberCell;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LocalisationWidget extends Composite {

	/*
	 * Elements graphiques
	 */
	private VerticalPanel contentPanel = new VerticalPanel();

	private TextBox textBoxLocalisation = new TextBox();

	/**
	 * 
	 */
	public LocalisationWidget() {
		super();

		contentPanel.setStyleName("widget");

		contentPanel.setSize("600px", "");

		FlexTable flexTable = new FlexTable();
		contentPanel.add(flexTable);

		Label lblEnd = new Label("Localiser");
		flexTable.setWidget(0, 0, lblEnd);
		flexTable.setWidget(1, 0, textBoxLocalisation);

		// definition de l'id pour js
		textBoxLocalisation.getElement().setId("textBoxLocalisation");

		initWidget(contentPanel);
		
		CellTable<Object> cellTable = new CellTable<Object>();
		contentPanel.add(cellTable);
		
		Column<Object, Number> column = new Column<Object, Number>(new NumberCell()) {
			@Override
			public Number getValue(Object object) {
				return (Number) null;
			}
		};
		cellTable.addColumn(column, "New Column");
	}
}
